package com.xbts.common.core.enums;

/**
 * 虚拟数据类型枚举
 *
 * @author xbts
 */
public enum VirtualDataTypeEnum {
    SCREEN_BUSINESS_DETAILS("screen_business_details", "大屏-业务信息"),
    SCREEN_CAPACITY_DETAILS("screen_capacity_details", "大屏-产能信息"),
    SCREEN_COST_DETAILS_A("screen_cost_details_a", "大屏-成本信息A"),
    SCREEN_COST_DETAILS_B("screen_cost_details_b", "大屏-成本信息B"),
    SCREEN_CONSUME_DETAILS("screen_consume_details", "大屏-能耗信息"),
    SCREEN_QUALITY_DETAILS("screen_quality_details", "大屏-品质信息"),
    SCREEN_QUALITY_ANALYSE_A("screen_quality_analyse_a", "大屏-品质分析A"),
    SCREEN_QUALITY_ANALYSE_B("screen_quality_analyse_b", "大屏-品质分析B"),
    BUSINESS_DAY_DETAILS("business_day_details", "业务-天-详情"),
    BUSINESS_WEEK_DETAILS("business_week_details", "业务-周-详情"),
    BUSINESS_MONTH_DETAILS("business_month_details", "业务-月-详情"),
    BUSINESS_DAY_STATISTICS("business_day_statistics", "业务-天-统计"),
    BUSINESS_WEEK_STATISTICS("business_week_statistics", "业务-周-统计"),
    BUSINESS_MONTH_STATISTICS("business_month_statistics", "业务-月-统计"),
    BUSINESS_DAY_RANKING("business_day_ranking", "业务-天-排行"),
    BUSINESS_WEEK_RANKING("business_week_ranking", "业务-周-排行"),
    BUSINESS_MONTH_RANKING("business_month_ranking", "业务-月-排行"),
    CAPACITY_DAY_DETAILS("capacity_day_details", "产能-天-详情"),
    CAPACITY_WEEK_DETAILS("capacity_week_details", "产能-周-详情"),
    CAPACITY_MONTH_DETAILS("capacity_month_details", "产能-月-详情"),
    CONSUME_WATER_DAY_DETAILS("consume_water_day_details", "能耗-水力-天-详情"),
    CONSUME_WATER_WEEK_DETAILS("consume_water_week_details", "能耗-水力-周-详情"),
    CONSUME_WATER_MONTH_DETAILS("consume_water_month_details", "能耗-水力-月-详情"),
    CONSUME_ELECTRICITY_DAY_DETAILS("consume_electricity_day_details", "能耗-电力-天-详情"),
    CONSUME_ELECTRICITY_WEEK_DETAILS("consume_electricity_week_details", "能耗-电力-周-详情"),
    CONSUME_ELECTRICITY_MONTH_DETAILS("consume_electricity_month_details", "能耗-电力-月-详情"),
    QUALITY_OVERALL_DAY_DETAILS("quality_overall_day_details", "品质-总体-天-详情"),
    QUALITY_OVERALL_WEEK_DETAILS("quality_overall_week_details", "品质-总体-周-详情"),
    QUALITY_OVERALL_MONTH_DETAILS("quality_overall_month_details", "品质-总体-月-详情"),
    QUALITY_WORKSHOP_DAY_DETAILS("quality_workshop_day_details", "品质-车间-天-详情"),
    QUALITY_WORKSHOP_WEEK_DETAILS("quality_workshop_week_details", "品质-车间-周-详情"),
    QUALITY_WORKSHOP_MONTH_DETAILS("quality_workshop_month_details", "品质-车间-月-详情"),
    COST_OVERALL_DAY_DETAILS("cost_overall_day_details", "成本-总体-天-详情"),
    COST_OVERALL_WEEK_DETAILS("cost_overall_week_details", "成本-总体-周-详情"),
    COST_OVERALL_MONTH_DETAILS("cost_overall_month_details", "成本-总体-月-详情"),
    COST_WORKSHOP_DAY_DETAILS("cost_workshop_day_details", "成本-车间-天-详情"),
    COST_WORKSHOP_WEEK_DETAILS("cost_workshop_week_details", "成本-车间-周-详情"),
    COST_WORKSHOP_MONTH_DETAILS("cost_workshop_month_details", "成本-车间-月-详情"),
    COST_WORKSHOP_WATER_DAY_DETAILS("cost_workshop_water_day_details", "成本-车间-水-天-详情"),
    COST_WORKSHOP_WATER_WEEK_DETAILS("cost_workshop_water_week_details", "成本-车间-水-周-详情"),
    COST_WORKSHOP_WATER_MONTH_DETAILS("cost_workshop_water_month_details", "成本-车间-水-月-详情"),
    COST_WORKSHOP_ELECTRICITY_DAY_DETAILS("cost_workshop_electricity_day_details", "成本-车间-电-天-详情"),
    COST_WORKSHOP_ELECTRICITY_WEEK_DETAILS("cost_workshop_electricity_week_details", "成本-车间-电-周-详情"),
    COST_WORKSHOP_ELECTRICITY_MONTH_DETAILS("cost_workshop_electricity_month_details", "成本-车间-电-月-详情"),
    COST_WORKSHOP_MANPOWER_DAY_DETAILS("cost_workshop_manpower_day_details", "成本-车间-人工-天-详情"),
    COST_WORKSHOP_MANPOWER_WEEK_DETAILS("cost_workshop_manpower_week_details", "成本-车间-人工-周-详情"),
    COST_WORKSHOP_MANPOWER_MONTH_DETAILS("cost_workshop_manpower_month_details", "成本-车间-人工-月-详情"),
    COST_WORKSHOP_MATERIAL_DAY_DETAILS("cost_workshop_material_day_details", "成本-车间-材料-天-详情"),
    COST_WORKSHOP_MATERIAL_WEEK_DETAILS("cost_workshop_material_week_details", "成本-车间-材料-周-详情"),
    COST_WORKSHOP_MATERIAL_MONTH_DETAILS("cost_workshop_material_month_details", "成本-车间-材料-月-详情"),
    ;
    private final String key;
    private final String value;

    VirtualDataTypeEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    public static String getValueByKey(String key) {
        for (VirtualDataTypeEnum virtualDataTypeEnum : VirtualDataTypeEnum.values()) {
            if (virtualDataTypeEnum.getKey().equals(key)) {
                return virtualDataTypeEnum.getValue();
            }
        }
        return null;
    }
    public static String getKeyByValue(String value) {
        for (VirtualDataTypeEnum virtualDataTypeEnum : VirtualDataTypeEnum.values()) {
            if (virtualDataTypeEnum.getValue().equals(value)) {
                return virtualDataTypeEnum.getKey();
            }
        }
        return null;
    }
    public static VirtualDataTypeEnum getByKey(String key) {
        for (VirtualDataTypeEnum virtualDataTypeEnum : VirtualDataTypeEnum.values()) {
            if (virtualDataTypeEnum.getKey().equals(key)) {
                return virtualDataTypeEnum;
            }
        }
        return null;
    }
    public static VirtualDataTypeEnum getByValue(String value) {
        for (VirtualDataTypeEnum virtualDataTypeEnum : VirtualDataTypeEnum.values()) {
            if (virtualDataTypeEnum.getValue().equals(value)) {
                return virtualDataTypeEnum;
            }
        }
        return null;
    }
}